package com.binarysoft.service.common.snmp;

import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;

public interface SnmpResult extends Serializable {
	/**
	 * 获取结果集中的值的数量
	 * 
	 * @return the size of result
	 */
	int size();

	/**
	 * 返回结果集的迭代器
	 * 
	 * @return iterator of the result set
	 */
	Iterator<SnmpValue> iterator();

	/**
	 * Get all values of the result set.
	 * 
	 * @return all values in the result set.
	 */
	Collection<SnmpValue> getValues();

	/**
	 * 获取给定OID的索引值
	 * 
	 * @param oid
	 *            the oid the object
	 * @return all indexes
	 */
	Collection<String> getIndexes(String oid);

	/**
	 * @deprecated
	 * @param objectName
	 * @return
	 */
	Collection<String> getIndexesByName(String objectName);

	/**
	 * Get value by OID and index
	 * 
	 * @param oid
	 * @param index
	 * @return
	 */
	SnmpValue getValue(String oid, String index);

	/**
	 * Get value by name and index
	 * 
	 * @deprecated
	 * @param objectName
	 * @param index
	 * @return
	 */
	SnmpValue getValueByName(String objectName, String index);

	/**
	 * Get values of the given object with the specified OID
	 * 
	 * @param oid
	 *            the OID of object
	 * @return values of the given object
	 */
	Collection<SnmpValue> getValues(String oid);

	/**
	 * @deprecated
	 * @param objectName
	 * @return
	 */
	Collection<SnmpValue> getValuesByName(String objectName);

	/**
	 * Add one SNMP value to the result set
	 * 
	 * @param value
	 *            the value to be added
	 */
	void addValue(SnmpValue value);

	/**
	 * Add a list of values to the result set
	 * 
	 * @param values
	 *            the values to be added
	 */
	void addValue(Collection<SnmpValue> values);
}
